package com.satchi.struts.action.useraction;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.satchi.commons.PageHelp;
import com.satchi.dao.imp.GetPageDaoImp;
import com.satchi.entiy.Page_e;
import com.satchi.hib.pojo.FinUser;
import com.satchi.service.GetPageService;

public class UserallinfoAction extends Action {

	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		GetPageService gps = new GetPageService();
		GetPageDaoImp gpdi = new GetPageDaoImp();
		int totalRows = gpdi.getCount();

		Page_e page = PageHelp.getPager(request, totalRows);
		List<FinUser> clInfos = gps.getPageListNullPar(page.getStartRow(),
				page.getPageSize());
		request.setAttribute("page", page);
		request.setAttribute("list", clInfos);
		request.setAttribute("totalRows", totalRows);
		return mapping.findForward("success");
	}
}
